Skip to content

fix(BBC): resolve epoch timer on live simulcast episodes#10959

Open
decbr1 wants to merge 3 commits into
PreMiD:mainfrom
decbr1:bbc-fixes
Open

fix(BBC): resolve epoch timer on live simulcast episodes#10959
decbr1 wants to merge 3 commits into
PreMiD:mainfrom
decbr1:bbc-fixes

Conversation

@decbr1

@decbr1 decbr1 commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes BBC iPlayer live simulcast episodes (e.g. World Cup matches) showing a nonsense epoch-based elapsed timer (495288:08:16+) instead of a Live badge.

Root causes:

  • Redux state (__IPLAYER_REDUX_STATE__) was fetched once via ??= and never refreshed on SPA navigation, so live detection always ran against stale/empty state.
  • Live DASH/HLS simulcast streams report video.currentTime/duration anchored to Unix epoch seconds which slip past the live check into the VOD timestamp branch.
  • episode.Live was checked with the wrong casing (BBC's actual field is lowercase episode.live) so that flag never worked regardless of staleness.
  • channel/header no longer exist in BBC's current redux shape for simulcast content; live detection now uses episode.live and versions[].kind === 'simulcast' instead. This also exposes real scheduled startTime/endTime for a correct elapsed/remaining timer.
  • /iplayer/live channel branch set startTimestamp in milliseconds instead of seconds.
  • Fetching the entire redux tree via getPageVariable('__IPLAYER_REDUX_STATE__') also crashed the Firefox extension (DOMException: Function object could not be cloned). Switched to scoped dot-notation fetches for just the fields used.

Screenshots

Proof showing the creation/modification is working as expected
Before:
image
image
After:
With 'iPlayer Title as Presence'
image
Without 'iPlayer Title as Presence'
Screenshot_20260703_024744

@dimerp

dimerp Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

🖼️ Activity asset preview

Another day, another diff. Here's everything shiny I could dig out of this one.

BBC (websites/B/BBC) — update

Preview Source URL
logo https://cdn.rcd.gg/PreMiD/websites/B/BBC/assets/logo.png
thumbnail https://cdn.rcd.gg/PreMiD/websites/B/BBC/assets/thumbnail.png

Beep boop — I refresh this comment on every push, so no need to scroll. 🤖

Comment thread websites/B/BBC/metadata.json Fixed
@Xyphia

Xyphia commented Jul 3, 2026

Copy link
Copy Markdown

seems good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants